package adv4;

import java.util.Scanner;

public class ScanTest {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// next,nextLine
		// char c=next().charAt(0)
		// sc.hasNextInt();

		// String s1 = sc.next();
		// System.out.println(s1 + ":" + s1.length());
		System.out.println("请输入年龄：");
		while (sc.hasNextInt() == false) {
			sc.nextLine();// 清空输入缓冲
			System.out.println("Zailai");
		}
		int age = sc.nextInt();
		System.out.println("您的年龄是" + age + "岁");

	}

}
